cmake_minimum_required(VERSION 3.20)
project(plus_one)
add_executable(plus_one main.cpp)
set(CMAKE_BUILD_TYPE Debug)

# 创建专门的ASan配置
set(CMAKE_CXX_FLAGS_ASAN "-O2 -g1 -fsanitize=address -fno-omit-frame-pointer"
    CACHE STRING "ASAN flags")
set(CMAKE_EXE_LINKER_FLAGS_ASAN "-fsanitize=address"
    CACHE STRING "ASAN link flags")